package Exer03_分支;

import java.util.Scanner;

public class _1_3_12_水仙花数 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个3位数，判断是否为水仙花数");
        int num = scanner.nextInt();
        int hundred = num/100;
        int ten = num%100/10;
        int individual = num%10;
        if (num == hundred*hundred*hundred+ten*ten*ten+individual*individual*individual){
            System.out.println("是水仙花数");
        }else {
            System.out.println("不是水仙花数");
        }
    scanner.close();
    }
}
